/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.springtree.spectrum.visa.persistence.factory;

import co.springtree.spectrum.visa.persistence.constant.EDatabase;
import java.sql.Connection;

public class DAOFactory {
	private static ConnectionDataSourcePoolMySQL connectionDataSource;
	private static DAOFactory connectionFactory = null;
	
	Connection conn = null;
	
	public DAOFactory(){
		if(connectionDataSource == null){
			connectionDataSource = new ConnectionDataSourcePoolMySQL();
		}
	}
	
	public static DAOFactory getInstance() {
		if (connectionFactory == null) {
			connectionFactory = new DAOFactory();
		}
		return connectionFactory;
	}
	

	public ConnectionDataSourcePoolMySQL getConnectionPool(EDatabase database){
		return this.connectionDataSource;
	}
	

}